Skip to content

feat(feed): request wrapping markdown on flag-on GETs - #4823

Draft
jmcbgaston wants to merge 2 commits into
box:masterfrom
jmcbgaston:enable-rich-text-feed-gets
Draft

jmcbgaston wants to merge 2 commits into
box:masterfrom
jmcbgaston:enable-rich-text-feed-gets

Conversation

@jmcbgaston

Copy link
Copy Markdown
Contributor

Description

Activity Feed V2 GETs append enable_rich_text=true when activityFeed.richText.enabled is on, and omit the key when it is off. Optional last args on the GET helpers so existing callers default to omit. Create and update stay param-free.

Quirk: do not send enable_rich_text=false. Absent key is the unwrap path for flag-off and older clients.

Flag-off and older clients omit the key so those reads still unwrap.
Never send false.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greg-in-a-box greg-in-a-box left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Wiring enable_rich_text=true only when activityFeed.richText.enabled is on (and omitting the key when off) looks right for the Feed / ActivitySidebar / FileActivities / ThreadedComments list paths. Never sending false matches the unwrap contract.

Requested changes

  1. Annotation thread GET still omits the param. Annotations.getAnnotation now accepts shouldEnableRichText, but useAnnotationAPI.handleFetch still calls it without that argument (only shouldFetchReplies: true). With the flag on, feed list/reply GETs can return wrapped markdown while opening an annotation thread re-fetches unwrapped content. Please thread activityFeed.richText.enabled into that fetch (and any sibling annotation GET that should stay consistent), or call out in the PR why annotation-thread reads intentionally stay on the unwrap path.

  2. True-path coverage is thin. New tests mostly assert the default false / omit path. Please add at least one feedItems / ActivitySidebar case that passes shouldEnableRichText: true and asserts it reaches Annotations / ThreadedComments / FileActivities, plus a unit test for getAnnotation(..., shouldEnableRichText: true) since that signature changed.

Nits (non-blocking)

  • Legacy fetchComments (non-replies) still has no rich-text param; fine if V2 always goes through threaded/UAA, but worth a one-line note in the description.
  • Feed cache key is still file-id only; toggling the flag without destroying the Feed instance could serve a stale wrap/unwrap shape (existing pattern, low risk if the flag is stable per mount).

Happy to re-review once the annotation-thread path (or an explicit deferral) is sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants